﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI;
using RN.ERP.Web.AuthorityService;
using RN.ERP.Web.ModelService;
using Newtonsoft.Json;


namespace RN.ERP.Web
{
    public class BaseLoginPage : System.Web.UI.Page
    {
        protected override void OnInit(EventArgs e)
        {
            string appId = ConfigurationManager.AppSettings["AppId"];
            string pageName = this.GetType().Name.ToLower();
            switch (appId)
            {
                case "101":
                    if (pageName != "lclogin_aspx")
                    {
                        Response.Redirect("~/LCLogin.aspx");
                    }
                    break;
                case "95":
                    if (pageName != "loginexpert_aspx")
                    {
                        Response.Redirect("~/LoginExpert.aspx");
                    }
                    break;
                default:
                    if (pageName != "login_aspx")
                    {
                        Response.Redirect("~/Login.aspx");
                    }
                    break;
            }
        }
    }
}